package modele;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.text.Collator;
import java.util.Comparator;


public class ComparatorParcours implements Comparator<Parcours>, Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 2L;
	Collator myCollator = Collator.getInstance();
	public int compare(Parcours o1, Parcours o2){
		try {
			return new Integer(o1.getIdent()).compareTo(new Integer(o2.getIdent()));
		}
		catch (Exception e){
			return 0;
		}
	}
	public boolean equals(Parcours o){
		try {
			return myCollator.equals(o.getIdent());
		}
		catch (Exception e){
			return false;
		}
	}
	private void writeObject(ObjectOutputStream out) throws IOException {
	}
	private void readObject(ObjectInputStream in) throws IOException {
	}
}
